package org.example.ExperimentThree.serverfile;

import java.io.*;
import java.net.*;

public class FileServer {
    public static void main(String[] args) throws IOException {
        System.out.println("服务端启动中...");
        ServerSocket ss = new ServerSocket(58874);
        while (true) {
            Socket s = ss.accept();
            System.out.println("连接到客户端: " + s.getInetAddress());
            Thread t = new FileServerThread(s);
            t.start();
        }
    }
}

